package com.melesta.payment.inapp3;

import com.melesta.payment.interfaces.IListener;
import com.melesta.payment.interfaces.IResponse;

public class InAppResponse
  implements IResponse
{
  private int countPerItem;
  private int errorCode;
  private long internalId;
  private IListener listener;
  private String name;
  private String sku;
  private Status status;

  public int getCountPerItem()
  {
    return this.countPerItem;
  }

  public int getErrorCode()
  {
    return this.errorCode;
  }

  public long getInternalId()
  {
    return this.internalId;
  }

  public String getName()
  {
    return this.name;
  }

  public String getSku()
  {
    return this.sku;
  }

  public Status getStatus()
  {
    return this.status;
  }

  public void run()
  {
    switch (1.$SwitchMap$com$melesta$payment$inapp3$InAppResponse$Status[this.status.ordinal()])
    {
    default:
      return;
    case 1:
      this.listener.onPurchase(this.name, this.countPerItem, this.internalId);
      return;
    case 2:
      this.listener.onCancel(this.name);
      return;
    case 3:
    }
    this.listener.onError(this.name, this.errorCode, null);
  }

  public InAppResponse setCountPerItem(int paramInt)
  {
    this.countPerItem = paramInt;
    return this;
  }

  public InAppResponse setErrorCode(int paramInt)
  {
    this.errorCode = paramInt;
    return this;
  }

  public void setInternalId(long paramLong)
  {
    this.internalId = paramLong;
  }

  public InAppResponse setListener(IListener paramIListener)
  {
    this.listener = paramIListener;
    return this;
  }

  public InAppResponse setName(String paramString)
  {
    this.name = paramString;
    return this;
  }

  public InAppResponse setSku(String paramString)
  {
    this.sku = paramString;
    return this;
  }

  public InAppResponse setStatus(Status paramStatus)
  {
    this.status = paramStatus;
    return this;
  }

  public static enum Status
  {
    static
    {
      CANCEL = new Status("CANCEL", 1);
      ERROR = new Status("ERROR", 2);
      SENT = new Status("SENT", 3);
      Status[] arrayOfStatus = new Status[4];
      arrayOfStatus[0] = PURCHASED;
      arrayOfStatus[1] = CANCEL;
      arrayOfStatus[2] = ERROR;
      arrayOfStatus[3] = SENT;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.melesta.payment.inapp3.InAppResponse
 * JD-Core Version:    0.6.2
 */